package com.xoa.controller.party;


import com.xoa.model.party.InspectorProblemInfo;
import com.xoa.service.party.InspectorProblemInfoService;
import com.xoa.util.common.wrapper.BaseWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by 程叶同 on 2018/1/6.
 */
@Controller
@RequestMapping("inspectorProblemInfo")
public class InspectorProblemInfoController {
    @Autowired
    InspectorProblemInfoService inspectorProblemInfoService;

    @RequestMapping("/addProblemInfo")
    @ResponseBody
    public BaseWrapper addProblemInfo(HttpServletRequest request, InspectorProblemInfo inspectorProblemInfo){
        return inspectorProblemInfoService.addProblemInfo(inspectorProblemInfo);
    }

    @RequestMapping("/deleteProblemInfo")
    @ResponseBody
    public BaseWrapper deleteProblemInfo(HttpServletRequest request, Integer id){
        return inspectorProblemInfoService.deleteProblemInfo(request,id);
    }
    @RequestMapping("/getProblemInfoAll")
    @ResponseBody
    public BaseWrapper getProblemInfoAll(HttpServletRequest request, Integer page, Integer pageSize, String subcounty, String reportUnitName, String userName){
        return inspectorProblemInfoService.getProblemInfoAll(request,page,pageSize,subcounty,reportUnitName,userName);
    }
    @RequestMapping("/updateProblemInfo")
    @ResponseBody
    public BaseWrapper updateProblemInfo(HttpServletRequest request, InspectorProblemInfo inspectorProblemInfo){
        return inspectorProblemInfoService.updateProblemInfo(request,inspectorProblemInfo);
    }
    @RequestMapping("/getProblemInfoById")
    @ResponseBody
    public BaseWrapper getProblemInfoById(HttpServletRequest request, Integer id){
        return inspectorProblemInfoService.getProblemInfoById(id);
    }
    @RequestMapping("/outPutFile")
    @ResponseBody
    public BaseWrapper outPutFile(HttpServletRequest request, HttpServletResponse response, String ids){
        return inspectorProblemInfoService.outPutFile(request,response,ids);
    }
}
